<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${content.id}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-2 control-label">所属导航：</label>
								<div class="col-sm-9">
									<input id="webMenuid" name="webMenuid" class="hidden" th:value="${content.webMenuid}">
									<input id="webMenuName" name="webMenuName" th:value="${content.webMenuName}" class="form-control" type="text" style="cursor: pointer;" onclick="openMenu()" readonly="readonly" placeholder="所属导航">

									<!--<input id="webMenuid" name="webMenuid" th:value="${content.webMenuid}" class="form-control" type="text">-->
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">标题：</label>
								<div class="col-sm-9">
									<input id="webTitle" name="webTitle" th:value="${content.webTitle}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">概要：</label>
								<div class="col-sm-9">
									<textarea rows="5" id="webResume" name="webResume" th:text="${content.webResume}" class="form-control"></textarea>
									<!--<input id="webResume" name="webResume" th:value="${content.webResume}" class="form-control" type="text">-->
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">缩略图：</label>
								<div class="col-sm-9">
									<input id="webThumb" name="webThumb" class="form-control" type="hidden" th:value="${content.webThumb}">
									<button type="button" class="layui-btn" id="test1">
										<i class="fa fa-cloud"></i>上传文件
									</button>

								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label"></label>
								<div class="col-sm-9">
									<img id="webThumbSrc" style="width:45px;height:45px;" th:src="${content.webThumb}"/>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-2 control-label">附件地址：</label>
								<div class="col-sm-9">
									<input id="filePath" name="filePath" class="form-control" type="hidden" th:value="${content.filePath}">
									<button type="button" class="layui-btn" id="test2">
										<i class="fa fa-cloud"></i>上传文件
									</button>
									<!--<input id="filePath" name="filePath" class="form-control" type="text">-->
								</div>
							</div>
							<div class="form-group">
								<input id="webContent" name="webContent" type="hidden" th:value="${content.webContent}">
								<label class="col-sm-2 control-label">内容：</label>
								<div class="col-sm-9">
									<div class="ibox-content no-padding">
										<div id="content_sn" class="summernote"></div>
									</div>
								</div>
							</div>
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-2 control-label">创建时间：</label>-->
								<!--<div class="col-sm-9">-->
									<!--<input id="createDate" name="createDate" th:value="${content.createDate}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-2 control-label">创建人：</label>-->
								<!--<div class="col-sm-9">-->
									<!--<input id="createUser" name="createUser" th:value="${content.createUser}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
														<!--<div class="form-group">	-->
								<!--<label class="col-sm-2 control-label">是否发布：</label>-->
								<!--<div class="col-sm-9">-->
									<!--<input id="webPublish" name="webPublish" th:value="${content.webPublish}" class="form-control" type="text">-->
								<!--</div>-->
							<!--</div>-->
																					<div class="form-group">
								<div class="col-sm-9 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script src="/js/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/system/content/edit.js"></script>
	<script type="text/javascript">
        layui.use('upload', function () {
            var upload = layui.upload;
            //执行实例
            var uploadInst = upload.render({
                elem: '#test1', //绑定元素
                url: '/common/sysFile/upload', //上传接口
                size: 5000,
                accept: 'file',
                done: function (r) {
                    layer.msg(r.msg);
                    $("#webThumbSrc").attr("src",r.fileName);
                    $("#webThumb").val(r.fileName);
                },
                error: function (r) {
                    layer.msg(r.msg);
                }
            });

            var uploadInst = upload.render({
                elem: '#test2', //绑定元素
                url: '/common/sysFile/upload', //上传接口
                size: 5000,
                accept: 'file',
                done: function (r) {
                    layer.msg(r.msg);
                },
                error: function (r) {
                    layer.msg(r.msg);
                }
            });
        });

	</script>
</body>
</html>
